libxc/save: adjust the memory allocation for migration
authorYang Hongyang <yanghy@cn.fujitsu.com>
Thu, 14 May 2015 08:55:11 +0000 (16:55 +0800)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 14 May 2015 12:03:27 +0000 (13:03 +0100)
commit9087d0860139c765c69b088da12f3fc0da0cce0a
treefb1b328864cf8e692f46b3850a32707614f0bee0
parente3022486b309020bc6306fa0a9be39f59aa5fa34
libxc/save: adjust the memory allocation for migration

Move the memory allocation before the concrete live/nolive save
in order to avoid the free/alloc memory loop when using Remus.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
tools/libxc/xc_sr_common.h
tools/libxc/xc_sr_save.c